<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="/taglibs.jsp"%>
<!doctype html>
<html>
<head>
    <meta charset="UTF-8">  
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link href="${ctx}/resources/semanticui/semantic.min.css" rel="stylesheet" type="text/css" />
    <link href="${ctx}/resources/apps.css" rel="stylesheet" type="text/css" />
    <title>候选人简历</title>  
</head>
<body>
<div class="ui segment" id="n-page">
<input type="hidden" name="jobId" id="jobId" value="${jobId}" />
<input type="hidden" name="empId" id="empId" value="${employee.id}" />
          <div class="ui segment" id="n-content">
            <form class="ui form">
                <div class="field">
                    候选人姓名: ${employee.name}
                   
                </div>
                
                <div class="field">
                   所在城市: 		<c:choose>
	                    <c:when test="${not empty employee.cityName}">
	                    	${employee.cityName}
	                   </c:when>
	                   <c:otherwise>
	                   		${cityName}
	                   </c:otherwise>
       				</c:choose>
                </div>
                <div class="field">
                    现任公司: 
                    ${employee.companyName}
                       
                </div>
                <div class="field">
                   现任职位:        <c:choose>
	                    <c:when test="${not empty employee.roleName}">
	                    	${employee.roleName}
	                   </c:when>
	                   <c:otherwise>
	                   		${roleName}
	                   </c:otherwise>
       				</c:choose>
                </div>
                <div class="field">
                    现任工作年限: 
                   
                        ${employee.workage}
                    
                </div>
                <div class="field">
                    何时联系:
                    <c:choose>
    <c:when test="${employee.intentTime == '0' }">
        现在
    </c:when>  
    <c:when test="${employee.intentTime == '1' }">
        一月后
    </c:when>  
    <c:when test="${employee.intentTime == '6' }">
        半年后
    </c:when>   
    <c:otherwise>
        一年后
    </c:otherwise>
</c:choose> 
        <br>
                </div>
                
                <!-- div class="field">
                    <label>联系电话</label>
                    <div class="ui input">
                        <input type="text" id="mobile" name="mobile" value= "${employee.phone}"  placeholder="请输入候选人的手机号码">
                    </div>
                </div> -->

            </form>        
        </div>

        <div class="ui segment" id="cont-next">
            <div class="fluid ui button" id="next">邀请面试</div>
        </div>
 
</div>

<script src="${ctx}/resources/jweixin-1.0.0.js"></script>

<script src="${ctx}/resources/semanticui/jquery-2.1.4.min.js"></script>
<script src="${ctx}/resources/semanticui/semantic.js" type="text/javascript"></script>
<script type="text/javascript">




    var handler = { 
        activate: function() { 
            $(this).addClass('active').siblings().removeClass('active'); 

            if($(this).attr('id') == 'next') {

                var postUrl = '${ctx}/wechat/headhunter/recommend/recommendInterview.do';
                
                var param = {};
                param['jobId']  = $('#jobId').val();
                param['empId']=$('#empId').val();

                $.ajax({ 
                    url: postUrl, 
                    type: "POST", 
                    data: param,
                    success: function(data) { 
                      if(data.errorcode==0){
                       var recommendId = data.recommendId;
                       location.href = "${ctx}/wechat/hunter/hr/toInterview.do?recommendid="+ recommendId;
                      }
                       alert(""+data.msg)
                    }, 
                    error: function() { 
                        alert("服务出错，请稍后尝试"); 
                    } 
                });
            }
        } 
    };

    

    $(document).ready(function() { 
        
            $('.button').on('click', handler.activate);
           
            
            wx.ready(function() { 
            wx.hideOptionMenu();
        });
    });

</script>
</body>
</html>